package com.java0107;

import java.util.Map;
import java.util.TreeMap;

public class TreeMap02 {
    public static void main(String[] args) {
        Map<Integer,String> map1 = new TreeMap<>();

        map1.put(4,"a");
        map1.put(2,"c");
        map1.put(1,"d");

        map1.forEach((k,v)->{
            System.out.println(k+"\t"+v);
        });
    }
}
